home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2002 September
/
PCWorld_2002-09_cd.bin
/
Akce
/
Quartet
/
Main
/
MAIN.SWF
/
scripts
/
DefineButton2_185
/
BUTTONCONDACTION on(release).as
< prev
next >
Wrap
Text File
|
2002-08-07
|
1KB
|
52 lines
on(release){
_root.SaveCurrentInteraction();
var sr = _root._arInteractions.getStudentResponse(_root.Q_objective_id);
var cr = _root._arInteractions.getCorrectResponse(_root.Q_objective_id);
var positive = true;
if(sr.length == cr.length)
{
var i = 0;
while(i <= cr.length - 1)
{
sr[i] = sr[i].toString(10);
if(_parent.Q_type == "DD-1")
{
var exist = false;
var cr_pom = cr[i].split(",");
var j = 0;
while(j <= cr_pom.length - 1)
{
if(cr_pom[j].toUpperCase() == sr[i])
{
exist = true;
break;
}
j++;
}
positive = positive && exist;
}
else if(sr[i].toUpperCase() == cr[i].toUpperCase())
{
positive = positive;
}
else
{
positive = positive && false;
}
i++;
}
}
else
{
positive = false;
}
if(positive)
{
_root.negative_positive.gotoAndStop("positive");
}
else
{
_root.negative_positive.gotoAndStop("negative");
}
}